Skip to content

feat: add _freshIndicator support for partial form submits#3753

Merged
bartlomieju merged 3 commits into
mainfrom
feat/partial-submit-indicator
Apr 9, 2026
Merged

feat: add _freshIndicator support for partial form submits#3753
bartlomieju merged 3 commits into
mainfrom
feat/partial-submit-indicator

Conversation

@bartlomieju

Copy link
Copy Markdown
Contributor

Summary

  • Extends the _freshIndicator loading signal to form submissions, not just anchor clicks
  • Checks the submitter element first, falling back to the form element
  • Wraps the fetch in try/finally to ensure the indicator resets on success or failure
  • Adds 3 browser tests: indicator on button, indicator on form, and submitter-over-form precedence

Closes #3504

Test plan

  • deno test -A packages/fresh/tests/partials_test.tsx --filter "submit form indicator" — all 3 new tests pass

🤖 Generated with Claude Code

bartlomieju and others added 3 commits April 8, 2026 19:31
Previously only anchor clicks toggled the _freshIndicator signal during
partial navigation. This extends the same behavior to form submissions,
checking the submitter element first and falling back to the form element.

Closes #3504

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a "Loading indicators" section to the partials docs covering
the _freshIndicator property, including the new submitter-over-form
precedence behavior for form submissions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bartlomieju bartlomieju merged commit 28cce5f into main Apr 9, 2026
9 checks passed
@bartlomieju bartlomieju deleted the feat/partial-submit-indicator branch April 9, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Partial loading indicator

1 participant